#ifndef TOOLBAR_H
#define TOOLBAR_H

#include <stdbool.h>
#include "SDL.h"

#define BUTTON_W    32
#define SEPARATOR_W 8 

typedef struct {
	int image;
	char* title;
	char* description;
} DropDown;

typedef struct {
	enum { OPTION, DROPDOWN, SEPARATOR, END_OF_BUTTONS } type;
	int image;
	char* action;
	DropDown dropdowns[20];
} Button;

typedef struct {
	Button* buttons;
	SDL_Surface* sf;
	int selected;
} Toolbar;

Toolbar* new_toolbar();
void toolbar_mouse_button(Toolbar* toolbar, SDL_MouseButtonEvent b, int tb_pos);
void free_toolbar(Toolbar* toolbar);

#endif
